package com.ddtc.controller;

/**
 * Created by dingd on 2018-07-21.
 */
import com.ddtc.object.SourceInfo;
import com.ddtc.object.WxAppId;
import com.ddtc.repo.SourceInfoRepository;
import com.ddtc.repo.WxAppIdRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
public class HelloController {

    @Autowired
    SourceInfoRepository sourceInfoRepo;

    @RequestMapping(value = "/hello", method = RequestMethod.GET)
    @ResponseBody
    public String hello() {
        String source = sourceInfoRepo.findRequestSourceByAppId("wx7aed3350a87d02ec");
        return "Hello " + source;
    }

}
